function hDeploy = getDeployNet(VDSRversion, scale)

deploy_file = fullfile(VDSR.path, 'net_deploy.prototxt');

%%
% switch version
%     case 'VDSR1' % /home/wks/SR-Works/%result/reimple_VDSR-1/models/reimple_VDSR_c1_clip1_more_iter_37000.caffemodel
%         caffe_model = fullfile(VDSR.path, 'reimple_VDSR_c1_clip1_more_iter_37000.caffemodel');
%     case 1 % /home/wks/SR-Works/%result/reimple_VDSR-1/models/reimple_VDSR_c1_clip1_more_iter_132500.caffemodel
%         caffe_model = fullfile(VDSR.path, 'reimple_VDSR_c1_clip1_more_iter_132500.caffemodel');
%     case 2 % /home/wks/SR-Works/%result/reimpleVDSR_y-1/models/reimpleVDSR_y_weight_newdata_132500_iter_85000.caffemodel
%         caffe_model = fullfile(VDSR.path, 'reimpleVDSR_y_weight_newdata_132500_iter_85000.caffemodel');
%     case 3 % /home/wks/SR-Works/%FineTuningMyVDSR-20Layer/[[srcaffe]-tuning2-[VDSR_y-1]]-tuning2-[VDSR_y-1]/models/VDSR_y_iter_4000.caffemodel
%         caffe_model = fullfile(VDSR.path, 'VDSR_y_iter_4000.caffemodel');
%     case 4 % /home/wks/SR-Works/%FineTuningMyVDSR-20Layer/[[[srcaffe]-tuning2-[VDSR_y-1]]-tuning2-[VDSR_y-2]]-tuning2-[VDSR_y-1]/models/VDSR_y_iter_1000.caffemodel
%         caffe_model = fullfile(VDSR.path, 'VDSR_y_iter_1000.caffemodel');
%     case 5 % /home/wks/SR-Works/%FineTuningMyVDSR-20Layer/[srcaffe]-tuning2-[VDSR_y-2]/models/VDSR_y_iter_500.caffemodel
%         caffe_model = fullfile(VDSR.path, 'VDSR_y_iter_500.caffemodel');
% end

model_idx = 0;
switch scale
    case 2 % VDSR03, VDSR19, VDSR35
        model_prefix = '/home/wks/SR-Works/%result/reimple_VDSR-1/models/myVDSR_fr_msra_x2/myVDSR_fr_msra_x2_iter_';
    case 3 % VDSR03, VDSR18
        switch VDSRversion
            case 'VDSR1'
                model_idx = 37000;
            case 'VDSR2'
                model_idx = 74000;
            case 'VDSR3'
                model_idx = 132500;
        end
        if model_idx == 0
            model_prefix = '/home/wks/SR-Works/%result/reimple_VDSR-1/models/VDSR_fr_msra_x3/VDSR_fr_msra_x3_iter_';
        else
            % old version
            model_prefix = '/home/wks/SR-Works/%result/reimple_VDSR-1/models/reimple_VDSR_c1_clip1_more_iter_';
        end
    case 4 % VDSR03, VDSR19, VDSR35
        model_prefix = '/home/wks/SR-Works/%result/reimple_VDSR-1/models/myVDSR_fr_msra_x4/myVDSR_fr_msra_x4_iter_';
end

if model_idx == 0
    model_idx = eval(VDSRversion(end-1 : end)) * 2000;
end

caffe_model = [model_prefix, num2str(model_idx) '.caffemodel'];
hDeploy = @(x) mycaffe.caffe(x, deploy_file, caffe_model, 'test');
